
//用于与客户端连接
import java.io.*;
import java.net.*;
public class Server_Socket {
    ServerSocket serverSocket;
    Server_Socket(){
        try {
            serverSocket = new ServerSocket(2000);
            Server_DataWin.area.append("服务器启动成功\n");
        }catch(IOException e){
            Server_DataWin.area.append("端口监听失败!\n");
        }
        while(true) {
            try {
                Socket socket = serverSocket.accept();
                new Server_SocketToClient(socket);
            }catch(Exception e) {}
        }
    }
}
